home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Development Platforms / Macintosh Common Lisp Related / User Contributions / applescript-from-lisp / applescript⁄appleevents / Utils.lisp < prev   
Encoding:
Text File  |  1994-06-16  |  514 b   |  17 lines  |  [TEXT/CCL2]

  1. ;;-*- Package: CL-User; -*-
  2. (in-package :cl-user)
  3.  
  4. (export '(MAKE-LITERAL-STRING NULL-STRING-P))
  5.  
  6. (defmacro MAKE-LITERAL-STRING (string)
  7. ;;takes a string and string quotes it. e.g. "foo" ->
  8. ;;           "\"foo\""
  9.   `(concatenate 'string "\"" ,string "\""))
  10.  
  11. (DEFUN NULL-STRING-P (STRING)
  12.   "Return t if the string is "" otherwise nil"
  13.   (IF (NOT (STRINGP string))
  14.       (ERROR nil (FORMAT nil "The arg to null-string-p, ~a, is not a string.~%" string))
  15.       (IF (EQ (LENGTH string) 0)
  16.           t
  17.           nil)))